import { hireType } from '@/constant/enum/employees'
export function ENTOCH (list:RowDate[]){
  const map = {
    'id': '编号',
    'password': '密码',
    'mobile': '手机号',
    'username': '姓名',
    'timeOfEntry': '入职日期',
    'formOfEmployment': '聘用形式',
    'correctionTime': '转正日期',
    'workNumber': '工号',
    'departmentName': '部门',
    'staffPhoto': '头像地址',
  }
  const header=Object.keys(list[0]).map(key=>map[key as keyof typeof map])
  const data=list.map(obj=>{
    const key=obj['formOfEmployment'] as number
    obj['formOfEmployment']=hireType[key]
    return Object.values(obj)
  })
  return { header,data }
}